import axios from "axios";
import {deleteProduct, updateProduct} from "@/API/ProductAPI";
import WebUtils from "@/utils/webUtils";
const apiUrl = "http://localhost:8081/type";

export const getProductTypeList = async () => {
    try {
        WebUtils.addToken();
        const response = await axios.get(`${apiUrl}/list`);
        WebUtils.isRedirect(response.data.code);
        return response.data;
    } catch (error) {
        throw error;
    }
}